home *** CD-ROM | disk | FTP | other *** search
- head 1.4;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.4
- date 89.11.12.01.31.42; author rab; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 89.10.12.16.03.56; author douglis; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 89.08.01.15.15.42; author douglis; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 89.08.01.15.15.16; author douglis; state Exp;
- branches ;
- next ;
-
-
- desc
- @initial version (sprite-based??)
- @
-
-
- 1.4
- log
- @Added `ds3100.md' to machine dependent includes.
- @
- text
- @/* @@(#)a.out.h 4.2 (ULTRIX) 7/13/88 */
- /************************************************************************
- * *
- * Copyright (c) 1986,1988 by *
- * Digital Equipment Corporation, Maynard, MA *
- * All rights reserved. *
- * *
- * This software is furnished under a license and may be used and *
- * copied only in accordance with the terms of such license and *
- * with the inclusion of the above copyright notice. This *
- * software or any other copies thereof may not be provided or *
- * otherwise made available to any other person. No title to and *
- * ownership of the software is hereby transferred. *
- * *
- * This software is derived from software received from the *
- * University of California, Berkeley, and from Bell *
- * Laboratories. Use, duplication, or disclosure is subject to *
- * restrictions under license agreements with University of *
- * California and with AT&T. *
- * *
- * The information in this software is subject to change without *
- * notice and should not be construed as a commitment by Digital *
- * Equipment Corporation. *
- * *
- * Digital assumes no responsibility for the use or reliability *
- * of its software on equipment which is not supplied by Digital. *
- * *
- ************************************************************************/
- /*
- *
- * Modification History:
- *
- * 02 Apr 86 -- depp
- * Moved struct exec and associated magic numbers to <sys/exec.h>
- *
- */
- /* a.out.h 4.1 83/05/03 */
-
- #ifndef _AOUT
- #define _AOUT
-
- #include <ds3100.md/nlist.h>
- #include <ds3100.md/sys/exec.h>
-
- /*
- * See syms.h for "mips" symbol table
- */
-
-
- /* COMMON OBJECT FILE FORMAT
-
- File Organization:
-
- _______________________________________________ INCLUDE FILE
- |_______________HEADER_DATA___________________|
- | |
- | File Header | "filehdr.h"
- |.............................................|
- | |
- | Auxilliary Header Information | "aouthdr.h"
- | |
- |_____________________________________________|
- | |
- | ".text" section header | "scnhdr.h"
- | |
- |.............................................|
- | |
- | ".data" section header | ''
- | |
- |.............................................|
- | |
- | ".bss" section header | ''
- | |
- |_____________________________________________|
- |______________RAW_DATA_______________________|
- | |
- | ".text" section data (rounded to 4 |
- | bytes) |
- |.............................................|
- | |
- | ".data" section data (rounded to 4 |
- | bytes) |
- |_____________________________________________|
- |____________RELOCATION_DATA__________________|
- | |
- | ".text" section relocation data | "reloc.h"
- | |
- |.............................................|
- | |
- | ".data" section relocation data | ''
- | |
- |_____________________________________________|
- |__________LINE_NUMBER_DATA_(SDB)_____________|
- | |
- | ".text" section line numbers | "linenum.h"
- | |
- |.............................................|
- | |
- | ".data" section line numbers | ''
- | |
- |_____________________________________________|
- |________________SYMBOL_TABLE_________________|
- | |
- | ".text", ".data" and ".bss" section | "syms.h"
- | symbols | "storclass.h"
- | |
- |_____________________________________________|
- |________________STRING_TABLE_________________|
- | |
- | long symbol names |
- |_____________________________________________|
-
-
-
- OBJECT FILE COMPONENTS
-
- HEADER FILES:
- /usr/include/filehdr.h
- /usr/include/aouthdr.h
- /usr/include/scnhdr.h
- /usr/include/reloc.h
- /usr/include/linenum.h
- /usr/include/syms.h
- /usr/include/storclass.h
-
- STANDARD FILE:
- /usr/include/a.out.h "object file"
- */
-
- #include <ds3100.md/filehdr.h>
- #include <ds3100.md/aouthdr.h>
- #include <ds3100.md/scnhdr.h>
- #include <ds3100.md/reloc.h>
-
- /* Note if mips is defined syms.h includes sym.h and symconst.h */
- #include <ds3100.md/syms.h>
-
- /*
- * Coff files produced by the mips loader are guaranteed to have the raw data
- * for the sections follow the headers in this order: .text, .rdata, .data and
- * .sdata the sum of the sizes of last three is the value in dsize in the
- * optional header. This is all done for the benefit of the programs that
- * have to load these objects so only the file header and optional header
- * have to be inspected. The macro N_TXTOFF() takes pointers to file header
- * and optional header and returns the file offset to the start of the raw
- * data for the .text section. The raw data for the three data sections
- * follows the start of the .text section by the value of tsize in the optional
- * header.
- *
- * Object files produced by pre 0.23 versions of the compiler had their sections
- * rounded to 8 byte boundaries. 0.23 and later versions have their sections
- * rounded to 16 (SCNROUND in scnhdr.h) byte boundaries.
- */
- #if 0
- /* this is already defined in <sys/exec.h> */
-
- #define N_TXTOFF(f, a) \
- ((a).magic == ZMAGIC || (a).magic == LIBMAGIC ? 0 : \
- ((a).vstamp < 23 ? \
- ((FILHSZ + AOUTHSZ + (f).f_nscns * SCNHSZ + 7) & 0xfffffff8) : \
- ((FILHSZ + AOUTHSZ + (f).f_nscns * SCNHSZ + SCNROUND-1) & ~(SCNROUND-1)) ) )
- #endif
-
- #endif /* _AOUT */
- @
-
-
- 1.3
- log
- @Added include of <sys/exec.h>
- @
- text
- @d42 3
- a44 2
- #include <nlist.h>
- #include <sys/exec.h>
- d52 1
- a52 1
- File Organization:
- d54 54
- a107 54
- _______________________________________________ INCLUDE FILE
- |_______________HEADER_DATA___________________|
- | |
- | File Header | "filehdr.h"
- |.............................................|
- | |
- | Auxilliary Header Information | "aouthdr.h"
- | |
- |_____________________________________________|
- | |
- | ".text" section header | "scnhdr.h"
- | |
- |.............................................|
- | |
- | ".data" section header | ''
- | |
- |.............................................|
- | |
- | ".bss" section header | ''
- | |
- |_____________________________________________|
- |______________RAW_DATA_______________________|
- | |
- | ".text" section data (rounded to 4 |
- | bytes) |
- |.............................................|
- | |
- | ".data" section data (rounded to 4 |
- | bytes) |
- |_____________________________________________|
- |____________RELOCATION_DATA__________________|
- | |
- | ".text" section relocation data | "reloc.h"
- | |
- |.............................................|
- | |
- | ".data" section relocation data | ''
- | |
- |_____________________________________________|
- |__________LINE_NUMBER_DATA_(SDB)_____________|
- | |
- | ".text" section line numbers | "linenum.h"
- | |
- |.............................................|
- | |
- | ".data" section line numbers | ''
- | |
- |_____________________________________________|
- |________________SYMBOL_TABLE_________________|
- | |
- | ".text", ".data" and ".bss" section | "syms.h"
- | symbols | "storclass.h"
- | |
- |_____________________________________________|
- d115 1
- a115 1
- OBJECT FILE COMPONENTS
- d117 2
- a118 2
- HEADER FILES:
- /usr/include/filehdr.h
- d130 5
- a134 4
- #include "filehdr.h"
- #include "aouthdr.h"
- #include "scnhdr.h"
- #include "reloc.h"
- d136 1
- a136 1
- #include "syms.h"
- d154 3
- d162 1
- a162 1
-
- @
-
-
- 1.2
- log
- @ultrix version
- @
- text
- @d42 2
- a43 1
- #include <nlist.h> /* included for all machines */
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d1 28
- a29 3
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- d31 5
- a35 1
- * @@(#)a.out.h 5.2 (Berkeley) 4/7/87
- d37 1
- a38 5
- /*
- * Definitions of the a.out header
- * and magic numbers are shared with
- * the kernel.
- */
- d42 1
- a42 4
- #include <sys/exec.h>
-
- extern int Aout_PageSize[];
-
- d44 1
- a44 2
- * Macro to tell whether or not the magic number in an a.out file
- * is an illegal one.
- d47 103
- a149 71
- #define N_BADMAG(x) \
- (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC)
-
- /*
- * Macros to tell where various pieces of information start in the
- * a.out file.
- */
-
- #define N_PAGSIZ(x) (Aout_PageSize[(x).a_machtype])
-
- #define N_SYMOFF(x) \
- (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize + (x).a_drsize)
- #define N_STROFF(x) \
- (N_SYMOFF(x) + (x).a_syms)
-
- /*
- * Macros to tell where the various segments start in virtual memory,
- * when the process is loaded.
- */
- #include <kernel/procMach.h>
-
- #define N_TXTADDR(x) PROC_CODE_LOAD_ADDR(x)
- #define N_DATADDR(x) PROC_DATA_LOAD_ADDR(x)
- #define N_BSSADDR(x) PROC_DATA_BSS_ADDR(x)
-
- /*
- * Format of a relocation datum.
- */
- struct relocation_info {
- int r_address; /* address which is relocated */
- unsigned int r_symbolnum:24, /* local symbol ordinal */
- r_pcrel:1, /* was relocated pc relative already */
- r_length:2, /* 0=byte, 1=word, 2=long */
- r_extern:1, /* does not include value of sym referenced */
- :4; /* nothing, yet */
- };
-
- /*
- * Format of a symbol table entry; this file is included by <a.out.h>
- * and should be used if you aren't interested the a.out header
- * or relocation information.
- */
- struct nlist {
- union {
- char *n_name; /* for use when in-core */
- long n_strx; /* index into file string table */
- } n_un;
- unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
- char n_other; /* unused */
- short n_desc; /* see <stab.h> */
- unsigned long n_value; /* value of this symbol (or sdb offset) */
- };
- #define n_hash n_desc /* used internally by ld */
-
- /*
- * Simple values for n_type.
- */
- #define N_UNDF 0x0 /* undefined */
- #define N_ABS 0x2 /* absolute */
- #define N_TEXT 0x4 /* text */
- #define N_DATA 0x6 /* data */
- #define N_BSS 0x8 /* bss */
- #define N_COMM 0x12 /* common (internal to ld) */
- #define N_FN 0x1e /* file name symbol */
-
- #define N_EXT 01 /* external bit, or'ed in */
- #define N_TYPE 0x1e /* mask for all the type bits */
-
- /*
- * Sdb entries have some of the N_STAB bits set.
- * These are given in <stab.h>
- d151 5
- a155 1
- #define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
- a156 4
- /*
- * Format for namelist values.
- */
- #define N_FORMAT "%08x"
- @
-